package designpatterns.factory.simple.code;

public class DivOperation extends ArithmeticOperation {
    @Override
    public double operation(double num1, double num2) throws Exception {
        if(num2 == 0) {
            throw new RuntimeException("算数异常：num2 不能为0!");
        }
        return num1 / num2;
    }
}
